Release 10.1A: OpenEdge Development:
Progress 4GL Reference


BUFFER-COMPARE( ) method

This method does a rough compare of any common fields, determined by name, data type, and extent-matching, between the source buffer and the target buffer. The resulting logical value is either TRUE or FALSE as a whole. A single field that does not compare causes the entire buffer to return FALSE. If there are fields in one buffer that do not exist in the other, they are ignored.

Return type: LOGICAL

Applies to: Buffer object handle

Syntax
BUFFER-COMPARE( source-buffer-handle [ , mode-exp [ , except-list
     [ , pairs-list [ , no-lobs ] ] ] ] ) 

source-buffer-handle

An expression that evaluates to a buffer handle.

mode-exp

If mode-exp is given, it must evaluate to either “binary” or “case-sensitive” to provide that type of comparison.

except-list

A character expression that evaluates to a comma-separated list of field names to be excluded from the compare.

pairs-list

A character expression that evaluates to a comma-separated list of field-name pairs to be compared.

You can specify an array element as one or both of the fields. This lets you compare a field or array element in one buffer to a field or array element in the other buffer, when the two fields do not have the same name. The order within each field-name pair does not matter; each pair must contain one field name from the source and one field name from the target.

You can also compare one entire array to another by specifying its name without a subscript.

no-lobs

A logical expression indicating whether to ignore BLOB and CLOB fields in the compare. If TRUE, BLOB and CLOB fields are ignored during the compare. If FALSE, BLOB and CLOB fields are compared along with the other fields. The default value is FALSE (that is, BLOB and CLOB fields are included in the compare).

Note: You cannot use the BUFFER-COMPARE( ) method to compare records that contain CLOB fields, unless one or both of the corresponding fields contain the Unknown value (?); Progress generates a run-time error. However, you can convert CLOB fields to LONGCHAR values and use the EQ, GE, GT, LE, LT, and NE comparison operators, or the COMPARE function, to compare the LONGCHAR values.

If you want to compare BLOB fields only, you can set this option to FALSE and use the except-list option to exclude CLOB fields from the compare.

The following example fragment does a binary compare of two fields, one from each buffer:

BUFFER-COMPARE(bh2,"binary","cust-sales-rep,sales-rep"). 

Notes


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095